﻿using BCCommon;
using BCCommon.TMS.FreightEnums;
using System.ComponentModel.DataAnnotations;

namespace BCDto.TMS.FreightContact
{
    /// <summary>
    /// 货运常用联系人
    /// </summary>
    public class FreightContactRequestDto
    {
        /// <summary>
        /// 联系人姓名
        /// </summary>
        [Display(Name = "联系人姓名")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [RegularExpression(RegexPatterns.CHINESE,ErrorMessage ="{0} 应全部为中文")]
        [StringLength(20,MinimumLength =2,ErrorMessage ="{0} 最少2个字，最多15个字")]
        public string ContactName { get; set; }
        /// <summary>
        /// 联系人电话
        /// </summary>
        [Display(Name = "联系人电话")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [RegularExpression(RegexPatterns.TELEPHONE, ErrorMessage = "{0} 不正确，请输入正确手机号或固话号码")]
        [StringLength(20, MinimumLength = 2, ErrorMessage = "{0} 最少2个字，最多18个字")]
        public string ContactPhone { get; set; }
        /// <summary>
        /// 联系人类型
        /// </summary>
        [Display(Name = "联系人类型")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public FreightContactType ContactType { get; set; }

    }
}
